#!/bin/bash
read -p 'Enter your name:' name
echo "hello ${name},welcome to my program."
exit 0

for n in {1..255}
do
    host=192.168.1.${n}
    ping -c2 ${host} &>/dev/null
    if [ $? = 0 ];then
        echo "${host} is up"
    else:
        echo "${host} is down"
    fi
done
    